#include "process.h"
#include <unistd.h>
#include <string.h>

#define NUM 101
#define STY '#'

void process()
{
    char buffer[NUM];
    memset(buffer,0,sizeof(buffer));
    const char* lable = "/|-\\";
    int len = sizeof(lable);
   
    for(int i = 0; i <= 100; i++)
    {   
       buffer[i] = STY; 
       printf("[%-100s][%d%%][%c]\r",buffer,i,lable[i%len]);
       fflush(stdout); 
       usleep(10000);
       
    }
    printf("\n");
}

